/**
 * 
 */
package edu.rit.checkers;

import java.io.PrintStream;

/**
 * @author Ian
 *
 */
public class Logger {
	private boolean loggerOn;
	private PrintStream out;
	
	public Logger(PrintStream out) {
		this.loggerOn = true;
		this.out = out;
	}
	
	public void loggerOn(boolean loggerOn) {
		this.loggerOn = loggerOn;
	}
	
	public void println(Object obj) {
		if(this.loggerOn) {
			out.println(obj);
		}
	}
	
	public void print(Object obj) {
		if(this.loggerOn) {
			out.print(obj);
		}
	}
}
